import random
answer = random.randint(1, 100)  # 正确答案
counter = 1  # 计数器,为了控制猜的次数
while counter <= 5:  # 1 2 3 4 5
    guess = int(input("猜: "))  # 猜的答案
    if guess == answer:
        print("bingo!!!")
        break  # 终止循环
    elif guess > answer:
        print("猜大了，往小的猜!!!")
    else:
        print("猜小了，往大的猜!!!")
    counter += 1
else:
    print("right answer:", answer)